﻿package mortal.component.flowerBg
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class FlowerBg extends GSprite
    {
        private var _bg:ScaleBitmap;
        private var _flower1:GBitmap;
        private var _flower2:GBitmap;
        private var _flower3:GBitmap;
        private var _flower4:GBitmap;

        public function FlowerBg()
        {
            return;
        }// end function

        override public function setSize(param1:Number, param2:Number) : void
        {
            super.setSize(param1, param2);
            this._bg.setSize(param1, param2);
            this._flower1.x = param1 - this._flower1.width - 1;
            this._flower2.x = this._flower2.width + 1;
            this._flower3.x = param1 - this._flower3.width - 1;
            this._flower3.y = param2 - 1;
            this._flower4.x = this._flower4.width + 1;
            this._flower4.y = param2 - 1;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._bg = UIFactory.bg(0, 0, 10, 10, this);
            this._flower1 = UIFactory.gBitmap(ImagesConst.BgFlower, 0, 1, this);
            this._flower2 = UIFactory.gBitmap(ImagesConst.BgFlower, 0, 1, this);
            this._flower2.scaleX = -1;
            this._flower3 = UIFactory.gBitmap(ImagesConst.BgFlower, 0, 0, this);
            this._flower3.scaleY = -1;
            this._flower4 = UIFactory.gBitmap(ImagesConst.BgFlower, 0, 0, this);
            var _loc_1:int = -1;
            this._flower4.scaleY = -1;
            this._flower4.scaleX = _loc_1;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._bg.dispose(param1);
            this._flower1.dispose(param1);
            this._flower2.dispose(param1);
            this._flower3.dispose(param1);
            this._flower4.dispose(param1);
            return;
        }// end function

    }
}
